package com.wlient.basic.designPattern.factory;

import com.wlient.basic.designPattern.factory.base.BandConfig;
import com.wlient.basic.designPattern.factory.base.BaseConfig;
import com.wlient.basic.designPattern.factory.base.SchoolConfig;
import com.wlient.basic.designPattern.factory.base.ShopConfig;
import lombok.Getter;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author: 史炜立
 * @description: TODO
 * @date: 2023/3/16 13:14
 */
@Getter
@Component
public enum ConfigQueryEnum {
    Band {
        @Override
        public BaseConfig toDo() {
            return bandConfig;
        }
    },
    School {
        @Override
        public BaseConfig toDo() {
            return schoolConfig;
        }
    },
    Shop {
        @Override
        public BaseConfig toDo() {
            return shopConfig;
        }
    };
    @Resource
    private static SchoolConfig schoolConfig;

    @Resource
    private static ShopConfig shopConfig;

    @Resource
    private static BandConfig bandConfig;

    public abstract BaseConfig toDo();


}
